<?php

namespace App\Controller\App;

use App\Base\BaseCache;
use App\Base\BaseController4App;
use App\Base\Format;
use App\Entity\User;
use App\Model\LazyCommon\MiniAppModel;
use App\Model\LazyCommon\UserModel;
use App\Model\TopicModel;
use App\Model\UserLiveModel;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Symfony\Component\HttpFoundation\Request;

/**
 * @route("/app")
 */
class UserLiveController extends BaseController4App
{
    /**
     * @route("/user/live",name="AppGetUserLive")
     */
    public function AppGetUserLive()
    {
        $uid = $this->needToBeUser();
        $UserLiveModel = new UserLiveModel($this->getDoctrine());
//        $data = $UserLiveModel->getArrayByKVs(
//            array(
//                "userId"=>$uid
//                ,""
//            )
//        );
        $this->data = $UserLiveModel->getUserLive($uid);
        var_dump($this->data);
        return $this->json_out(1,"获取成功",$this->data);
    }

}
